package datastructure.sort.bean;

/**
 * 关于自己定义的data数据 用于排序的比较
 * Created by tanlee on 2016/3/17.
 */
public class MySortData implements Comparable<MySortData>{

    public int num;

    public MySortData(int num) {
        this.num = num;
    }

    @Override
    public int compareTo(MySortData o) {
        if(this.num == o.num){
            return 0;
        }
        else if(this.num < o.num){
            return - 1;
        }
        else {
            return 1;
        }
    }
}
